/**
   A class to convert degree, minute, seconds to decimal degrees
*/
public class Degrees
{
   /**
      Converts minutes and seconds to decimal degrees 
      @param degrees the degrees between -359 and 359
      @param minutes the minutes between 0 and 59
      @param seconds the minutes between 0 and 59
      @return the equivalent decimal degrees between -360 and 360 (exclusive)
   */
   public double decimalDegrees(int degrees, int minutes, int seconds)
   {
      double s=0.000000000;
      if (degrees>=0)
      s=s+(double)degrees+((double)((double)minutes+(double)seconds/60)*5/3)/100.0;
      else
      s=s+(double)degrees-((double)((double)minutes+(double)seconds/60)*5/3)/100.0;
      return s;
   }
}